package com.mycompany.project.client;

import com.google.gwt.event.shared.GwtEvent;


public class AnnotationDescrTextChangeEvent extends GwtEvent<AnnotationDescrTextChangeEventHandler> {
	public static Type<AnnotationDescrTextChangeEventHandler> TYPE=new Type<AnnotationDescrTextChangeEventHandler>();
	private int annotationPreviewIndex; // index of annotation in previews panel list.
	private String updateText; // annotation preview text
	
	
	public AnnotationDescrTextChangeEvent(int index,String textUpdate){
		annotationPreviewIndex=index;
		updateText=textUpdate;
	}

	
	public int getAnnotationPreviewIndex(){
		return(annotationPreviewIndex);
	}

	public String getAnnotationPreviewText(){
		return(updateText);
	}

	

	@Override
	protected void dispatch(AnnotationDescrTextChangeEventHandler handler) {
		handler.onKeyWordTextChange(this);
		
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<AnnotationDescrTextChangeEventHandler> getAssociatedType() {
		// TODO Auto-generated method stub
		return TYPE;
	}
	
	
	

}
